package com.vcredit.creditcat.service.product;

import java.io.IOException;
import java.util.Map;

import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.vcredit.creditcat.enumtype.AuthItemEnum;
import com.vcredit.creditcat.exception.ProductCanNotApplyException;
import com.vcredit.creditcat.exception.ResourceException;
import com.vcredit.creditcat.model.Cust;
import com.vcredit.creditcat.model.CustProductApply;
import com.vcredit.creditcat.model.ProductItem;
import com.vcredit.framework.exception.BaseException;

/**
 * @author 张新功
 */
public interface IProductApplyService {
  //-----------------------------------------------信用猫端－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－//
  /**
   * 额度申请
   * @param custId
   * @param productIds
   * @throws Exception
   */
  Object applyCommit(Long custId, Long productId,Map<String,String> otherParams) throws Exception;

  /**
   * 主动查询
   * @param identityNo
   * @throws BaseException
   */
  void queryLimit(CustProductApply custProductApply) throws Exception;

  Boolean hasAlreadyAuditAmount(Object object) throws ProductCanNotApplyException,
      JsonParseException, JsonMappingException, IOException;

  Object getProductCommitParam(Long productId, Cust cust, Map<AuthItemEnum, Object> itemMap,Map<String,String> otherParams)
      throws ResourceException, Exception;

  Object getCreditAmountParam(Cust cust, ProductItem productItem) throws Exception;

  Object getAudInputParam(Object dto) throws ProductCanNotApplyException;

  /**
  * @description: TODO(描述这个方法的作用)
  * @author: 张新功
  * @param outputDto
  * @return
  * @throws Exception
  */

  CustProductApply getSaveAuditResultParam(Long custId, Long productId, Object input)
      throws Exception;


  /**
  * @description: TODO(描述这个方法的作用)
  * @author: 张新功
  * @param cust
  * @return
  */

  Object getProductCheckCreditParam(Cust cust);


  /**
  * @description: TODO(描述这个方法的作用)
  * @author: 张新功
  * @param commitOutput
  */

  Object checkCreditResult(Long custId, Long productId, Object commitOutput) throws Exception;

}
